using System;
using System.ComponentModel.Design;

namespace ALPControls
{
    class ActionCollectionEditor: CollectionEditor
    {        
        public ActionCollectionEditor(Type type): base(type) {}

        protected override object SetItems(object editValue, object[] value)
        {
            var collection = (ActionCollection)editValue;
            var result = base.SetItems(editValue, value);
            foreach (Action act in value)
                act.Provider = collection.Provider;
            return result;
        }
    }
}
